package com.hudson.plugin.ccheck.service;

import com.hudson.plugin.ccheck.domain.dao.CcheckresultDAOInterface;
import com.hudson.plugin.server.hibernateDB.internal.domain.entity.BuildsEntity;
import com.hudson.plugin.server.hibernateDB.internal.domain.entity.HudsonsEntity;
import com.hudson.plugin.server.hibernateDB.internal.domain.entity.ProjectsEntity;
import com.hudson.plugin.server.hibernateDB.internal.domain.entity.ViewsEntity;
import com.hudson.plugin.server.hibernateDB.service.ReportDBService;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

/**
 * Created by IntelliJ IDEA.
 * User: Richard
 * Date: 5/30/11
 * Time: 11:12 PM
 * To change this template use File | Settings | File Templates.
 */
public interface CCheckDBStore extends ReportDBService {
    Map<String, String> storeToDB(Map<String, Map<String, String>> valuePairsContainer) throws Exception;

    @Transactional(readOnly = false, propagation = Propagation.REQUIRED)
    void updatePluginTable(Map<String, String> valuePairs, HudsonsEntity hudsonsEntity, ViewsEntity viewsEntity, ProjectsEntity projectsEntity, BuildsEntity buildsEntity) throws Exception;

    public CcheckresultDAOInterface getCcheckresultDAO();

    public void setCcheckresultDAO(CcheckresultDAOInterface ccheckresultDAO);
}
